package com.bs.visitservice.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bs.visitservice.dao.DiscountCouponMapper;
import com.bs.visitservice.dao.UserDiscountMapper;
import com.bs.visitservice.entity.DiscountCoupon;
import com.bs.visitservice.entity.UserDiscount;
import com.bs.visitservice.service.DiscountCouponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
* @author idea
* @date 2020-02-06 09:13
**/
@Service
public class DiscountCouponServiceImpl extends ServiceImpl<DiscountCouponMapper, DiscountCoupon> implements DiscountCouponService{
    @Autowired
    private UserDiscountMapper userDiscountMapper;
    @Autowired
    private DiscountCouponMapper discountCouponMapper;

    @Override
    public List<Map<String, Object>> queryDiscountByUser(Map cond) {
        return userDiscountMapper.queryDiscountByUser(cond);
    }

    @Override
    public List<Map<String, Object>> queryDiscountSeller(Map cond) {
        return userDiscountMapper.queryDiscountSeller(cond);
    }

    @Override
    public List<Map<String, Object>> queryByOrder(Long orderNo) {
        return discountCouponMapper.queryByOrder(orderNo);
    }

    @Override
    public List<Map<String, Object>> querySellerDiscount(Map cond) {
        return discountCouponMapper.querySellerDiscount(cond);
    }
}